#include "mypushbutton.h"

MyPushButton::MyPushButton(QWidget* parent)
    :QPushButton(parent)
{}

void MyPushButton::enterEvent(QEvent *event)
{
    (void) event;
    int width = parentWidget()->geometry().width();
    int height = parentWidget()->geometry().height();

    int x = rand() % width;
    int y = rand() % height;

    this->move(x,y);
}
